/*!
\file DEdgeData.h
\brief Contains declaration of DEdgeData.
\ingroup DOT
*/

#ifndef DEDGEDATA_H
#define DEDGEDATA_H

#include"DCommonData.h"

/*!
\class DEdgeData
\brief Inherits DCommonData. This class is used to store information about an Edge to be shown in the DOT language.
\ingroup DOT
*/

class DEdgeData: public DCommonData{
public:
	DEdgeData( QString data );
	//!< Constructor. \param data is a representation of this Edge in the DOT language.
	~DEdgeData();
	
	QString toDOT( bool directed )const;
	//!< Returns a DOT representation of this Edge.
	int from()const{ return m_from; }
	//!< Returns identifier of Node in which it starts.
	int to()const{ return m_to; }
	//!< Returns identifier of Node in which it ends.
	QString label()const{ return getOption( "label" ); }
	//!< Returns label of Edge.
	int id()const{ return m_id; }
	//!< Returns identifier of Edge.
private:
	int m_from;
	int m_to;
	int m_id;
	
	void _setIDs( QString data );
	void _setOptions( QString options );
};

#endif
